home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 2 of 2).iso / cheats / lvlinfo / wall.h < prev   
C/C++ Source or Header  |  1995-03-15  |  3KB  |  100 lines

  1. #include "inferno.h"
  2. #include "segment.h"
  3. #include "object.h"
  4.  
  5. #define MAX_WALLS                    175    // Maximum number of walls
  6. #define MAX_WALL_ANIMS            30        // Maximum different types of doors
  7. #define MAX_DOORS                    50        // Maximum number of open doors
  8.  
  9. // Various wall types.
  10. #define WALL_NORMAL                0      // Normal wall
  11. #define WALL_BLASTABLE            1      // Removable (by shooting) wall
  12. #define WALL_DOOR                    2      // Door 
  13. #define WALL_ILLUSION            3      // Wall that appears to be there, but you can fly thru
  14. #define WALL_OPEN                    4        // Just an open side. (Trigger)
  15. #define WALL_CLOSED                5        // Wall.  Used for transparent walls.
  16.  
  17. // Various wall flags.
  18. #define WALL_BLASTED                1      // Blasted out wall.
  19. #define WALL_DOOR_OPENED        2      // Open door. 
  20. #define WALL_DOOR_LOCKED        8        // Door is locked.
  21. #define WALL_DOOR_AUTO            16        // Door automatically closes after time.
  22. #define WALL_ILLUSION_OFF        32        // Illusionary wall is shut off.
  23.  
  24. // Wall states
  25. #define WALL_DOOR_CLOSED        0        // Door is closed
  26. #define WALL_DOOR_OPENING        1        // Door is opening.
  27. #define WALL_DOOR_WAITING        2        // Waiting to close
  28. #define WALL_DOOR_CLOSING        3        // Door is closing
  29.  
  30. #define KEY_NONE                    1
  31. #define KEY_BLUE                    2
  32. #define KEY_RED                   4
  33. #define KEY_GOLD                   8
  34.  
  35. #define WALL_HPS                    100*F1_0        // Normal wall's hp
  36. #define WALL_DOOR_INTERVAL         5*F1_0        // How many seconds a door is open
  37.  
  38. #define DOOR_OPEN_TIME            i2f(2)        // How long takes to open
  39. #define DOOR_WAIT_TIME            i2f(5)        // How long before auto door closes
  40.  
  41. #define MAX_CLIP_FRAMES            20
  42.  
  43. // WALL_IS_DOORWAY flags.
  44. #define WID_FLY_FLAG                    1
  45. #define WID_RENDER_FLAG                2
  46. #define WID_RENDPAST_FLAG            4
  47. #define WID_EXTERNAL_FLAG            8
  48.  
  49. //    WALL_IS_DOORWAY return values            F/R/RP
  50. #define WID_WALL                        2    // 0/1/0        wall    
  51. #define WID_TRANSPARENT_WALL        6    //    0/1/1        transparent wall
  52. #define WID_ILLUSORY_WALL            3    //    1/1/0        illusory wall
  53. #define WID_TRANSILLUSORY_WALL    7    //    1/1/1        transparent illusory wall
  54. #define WID_NO_WALL                    5    //    1/0/1        no wall, can fly through
  55. #define WID_EXTERNAL                    8    // 0/0/0/1    don't see it, dont fly through it
  56.  
  57. #define    MAX_STUCK_OBJECTS    32
  58.  
  59. typedef struct stuckobj {
  60.     short    objnum, wallnum;
  61.     int    signature;
  62. } stuckobj;
  63.  
  64. typedef struct wall {
  65.     int    segnum,sidenum;    // Seg & side for this wall
  66.     fix   hps;                      // "Hit points" of the wall. 
  67.     int    linked_wall;        // number of linked wall
  68.     ubyte    type;                   // What kind of special wall.
  69.     ubyte    flags;                // Flags for the wall.        
  70.     ubyte    state;                // Opening, closing, etc.
  71.     byte    trigger;                // Which trigger is associated with the wall.
  72.     byte    clip_num;            // Which    animation associated with the wall. 
  73.     ubyte    keys;                    // which keys are required
  74.     short    pad;                    // keep longword aligned
  75.     } wall;
  76.  
  77. typedef struct active_door {
  78.     int        n_parts;                    // for linked walls
  79.     short        front_wallnum[2];        // front wall numbers for this door
  80.     short        back_wallnum[2];         // back wall numbers for this door
  81.     fix        time;                        // how long been opening, closing, waiting
  82. } active_door;
  83.  
  84. //wall clip flags
  85. #define WCF_EXPLODES        1        //door explodes when opening
  86. #define WCF_BLASTABLE    2        //this is a blastable wall
  87. #define WCF_TMAP1            4        //this uses primary tmap, not tmap2
  88. #define WCF_HIDDEN        8        //this uses primary tmap, not tmap2
  89.  
  90. typedef struct {
  91.     fix                play_time;
  92.     short                num_frames;
  93.     short                frames[MAX_CLIP_FRAMES];
  94.     short                open_sound;
  95.     short                close_sound;
  96.     short                flags;
  97.     char                filename[13];
  98.     char                pad;
  99. } wclip;
  100.